<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>页面布局4(Flex)</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        body {
            font-size: 14px;
        }

        #container {
            width: 100%;
            height: 100vh;

            display: flex;
            flex-direction: column;
        }

        #header {
            /* flex-basis: 80px;
            flex-shrink: 0; */
            flex: 0 0 80px;

            background-color: bisque;
            margin-bottom: 5px;
        }

        #nav {
            /* flex-basis: 40px;
            flex-shrink: 0; */
            flex: 0 0 40px;

            background-color:khaki;
            margin-bottom: 5px;
        }

        #footer {
            /* flex-basis: 60px;
            flex-shrink: 0; */
            flex: 0 0 60px;

            background-color: bisque;
            margin-top: 5px;
        }

        #main {
            /* flex-grow: 1;
            flex-shrink: 1; */
            flex: 1;

            display: flex;
            overflow:auto;
        }

        #content {
            flex: 6;
            margin: 0 5px;
            background-color: aquamarine;
            overflow:auto;
        }

        .aside {
            flex: 2;
            background-color: gray;
        }

    </style>

</head>
<body>
    <div id="container">
        <div id="header"></div>
        <div id="nav"></div>
        <div id="main">
            <div id="aside1" class="aside"></div>
            <div id="content">
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1><h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1><h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1><h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1><h1>测试</h1>
                <h1>测试</h1>
                <h1>测试</h1>
            </div>
            <div id="aside2" class="aside"></div>
        </div>
        <div id="footer"></div>
    </div>
</body>
</html>